﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head><title>EHS群组文章-EHS中国-</title>
    <link href="__TMPL__/style/group-style.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="/main/Public/Js/jquery-1.5.0.min.js"></script>
    <script type="text/javascript" src="/main/Public/Js/core.js"></script>
    <script type="text/javascript" src="/main/Public/Js/_login.js"></script>

  </head>
  <body>
    <layout name="Public:header0523" cache="0" />
    <div class="main">	
      <layout name="Public:group-member-base" cache="0" />

      <div class="content" style="">
        <div class="content_left" id="divLeft">
          <layout name="Public:group-member-left" cache="0" />
          <layout name="Public:circle-group-header" cache="0" />
          <dl>
            <dt>
              <div class="user_name"><a href="/column/u_{$article.member_info.uid}.html" target="_blank">{$article.member_info.username}</a></div>
              <div class="user_pic"><a href="/column/u_{$article.member_info.uid}.html" target="_blank"><img src="{$article.member_info.icon}" style="width:120px" /></a></div>
              <!--<p class="post">营长</p>
              <p><img src="__TMPL__/images/group/rank_01.png" /><img src="__TMPL__/images/group/rank_02.png" /></p> --><!--TODO-->
              <p>文章数：{$article.member_info.article_num}</p>
              <p>精华：{$article.member_info.excellent_num}</p>
              <!--  <p>积分：1949</p>
                <p>在线时间：5小时</p>
                <div class="vip"><img src="__TMPL__/images/group/img_vip.png" /></div>--><!--TODO-->
            </dt>
            <dd>
              <div class="articule_info">
                <!--<span class="superscript"></span><span><a href="#"><img src="__TMPL__/images/group/font_size02.png" /></a></span>-->
                <!--<span><a href="#"><img src="__TMPL__/images/group/font_size01.png" /></a></span><span class="font_size">字体大小:</span>-->
                <if condition="$isOwner"><span class="print"><a href="__URL__/post/cyid/{$article.cyid}/aid/{$article.id}">编辑</a></span></if>发表于 {$article.create_time} 
              </div>
              <div class="articule_content">
                <h2>{$article.title}</h2>
                <span id="aContent">{$article.content}</span>
              </div>
              <div class="user_comment"><empty name="article.member_info.signature">这家伙很懒，什么也没留下。<else />{$article.member_info.signature}</empty></div>
            </dd>
            <div class="clear"></div>
          </dl>
          <volist name="list" id="vo" key="i">
            <dl id="comment_{$vo.id}">
              <dt>
                <div class="user_name">
				<a href="/column/u_{$vo.member_info.uid}.html" target="_blank">{$vo.member_info.username}</a></div>
                <div class="user_pic">
				<a href="/column/u_{$vo.member_info.uid}.html" target="_blank"><img src="{$vo.member_info.icon}" style="width:120px" /></a></div>
                <!--<p class="post">营长</p>
                <p><img src="__TMPL__/images/group/rank_01.png" /><img src="__TMPL__/images/group/rank_02.png" /></p> --><!--TODO-->
                <p>文章数：{$vo.member_info.article_num}</p>
                <p>精华：{$vo.member_info.excellent_num}</p>
                <!--  <p>积分：1949</p>
                  <p>在线时间：5小时</p>
                  <div class="vip"><img src="__TMPL__/images/group/img_vip.png" /></div>--><!--TODO-->
              </dt>
              <dd>
                <div class="articule_info">
                  <span class="superscript">{:($nowPage-1)*$records+$i}</span><span></span>
                  <a href="#" name="c_{:($nowPage-1)*$records+$i}">发表于 {$vo.create_time}</a>|<a href="#" onclick="return feedB({:($nowPage-1)*$records+$i});">回复</a><if condition="$ifAdmin eq true">|<a href="#" onclick="delComment({$vo.id});return false;">删除</a></if>
                </div>
                <div class="articule_content" id="div_{$i}">
                  <h2>{$vo.title}</h2>
                  {$vo.content}
                </div>
                <div class="user_comment"><empty name="vo.member_info.signature">这家伙很懒，什么也没留下。<else />{$vo.member_info.signature}</empty></div>
              </dd>
              <div class="clear"></div>
            </dl>
          </volist>
          <div style="line-height:30px; text-align:right; border-left: solid 1px #e4e4e4; border-right: solid 1px #e4e4e4; padding-right:15px;">{$page}</div>
          <!--评论-->
          <dl>
            <dt>
            </dt>
            <dd style="margin:0;padding: 0;">
              <div id="divCheckLogin" style="line-height:30px;margin-bottom: 10px;">
                <script>
                  checkLogin(1,'divCheckLogin');
                </script>
              </div>
              <form id="frm" action="__URL__/commentSave/" method="post">
                <textarea id="txtContent" name="content" cols="72" rows="8" style="width:510px;height:180px; font-size:14px;"></textarea>
                <script charset="utf-8" src="__TMPL__/js/editor/kindeditor.js"></script>
                <input type="button" style="line-height:16px;padding:3px auto;" <if condition="$isLogin">value="发表回复"<else/>value="回复请先登录" disabled="true"</if> onclick="clickComment()"/>
                <input name="cyid" value="{$cyid}" type="hidden"/>
                <input name="uid" value="{$uid}" type="hidden"/>
                <input name="username" value="{$username}" type="hidden"/>
                <input name="aid" value="{$articl_id}" type="hidden"/>
				<input name="upline_id" value="0" id="upline_id" type="hidden"/>	
              </form>
            </dd>

          </dl>
        </div><!--end left-->
        <div class="content_right" style="display:none">
          <layout name="Public:group-right" cache="0" />
        </div><!--end right-->
      </div><!--end content-->


      <div class="footer">
        <layout name="Public:footer" cache="0" />
      </div>
    </div>
    <script>
      $("#divLeft img").each(function(i,self){
        var width = $(self).attr("width");
        if (width > 760) $(self).attr('width',760);
      });
      
      KE.init({
        id : 'txtContent',
        items:['emoticons'],
        resizeMode:1
      });
      KE.create('txtContent');
	   
      KE.event.add(KE.g['txtContent'].iframeDoc, 'click',cText,'txtContent');
      KE.event.add(KE.g['txtContent'].iframeDoc, 'blur',sText,'txtContent');
	 
	 
      function cText(){
        if(KE.text('txtContent')=='既然来了，留个记号吧~')
          KE.text('txtContent','');
      }
      function sText(){
        if(KE.text('txtContent')=='')
          KE.text('txtContent','既然来了，留个记号吧~');
      }

      function clickComment(){
        if ($("#txtContent").val() == "") {
          alert("回复内容不能为空");
          return ;
        }
        $("#frm").submit();
      }
	  
	  function feedB(id){
	     $('#upline_id').val(id);
	     KE.html('txtContent', "<a href='/main/public.php/circle/article/cyid/{$cyid}/id/{$aid}/&p={$nowPage}#c_"+id+"'>回复 "+id+"楼</a><br>");
		 //alert($('#upline_id').val());
		 return false;
	  }
	  
	   //加载文章内容
	   var agt = navigator.userAgent.toLowerCase();
       var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	   window.getObj?0:getObj=function(s){return document.getElementById(s)};
	   function IsElement(id) {
	     return document.getElementById(id) != null ? true : false;
      }
	  var diary_id='{$diary_id}';
	  if(diary_id!='0') {
	   //document.write('/pw8/apps.php?q=diary&a=detail&fromAjax=1&type=1&did='+diary_id);
       $.post(
        '/pw8/apps.php?q=diary&a=detail&fromAjax=1&type=1&did='+diary_id,
         function(data){
		 data=data.replace("images","/pw8/images");
		 data=data.replace("js/player.js",'/pw8/js/player.js');
		 //alert(data);
         $('#aContent').html(data);
        },
        'html'
       );
	  } 
	  
	  function delComment(i){
	    if(confirm('确定删除改评论吗？')){
		  $.getJSON('__URL__/delComment/cyid/{$cyid}/cid/'+i,
		  function(data){
		    if(data.status=='1'){ $('#comment_'+i).css('display','none');}
			else alert(data.info);
			return false;
		   }
		 );
		}
		return false;	  
	  }
	  
    </script>
  </body>
</html>
